package com.gaogzhen.service.impl;

import com.gaogzhen.service.WeatherService;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

@WebService(
        targetNamespace = "http://service.gaogzhen.com",
        portName = "WeatherWSImpl",
        serviceName = "WeatherWS",
        name = "WeatherSOAP"
)
public class WeatherServiceImpl implements WeatherService {
    @Override
    public @WebResult(name = "result") String queryWeather(@WebParam(name = "cityName") String cityName) {
        String weather = null;
        switch (cityName) {
            case "济南":
                weather = "秋高气爽";
                break;
            case "泰安":
                weather = "风和日丽";
            default:
                weather = "七月流火";
        }
        return weather;
    }
}
